//package cn.bonoon.kernel.support.searcher;
//
//import java.util.Map;
//import java.util.concurrent.ConcurrentHashMap;
//
//import org.springframework.context.ApplicationContext;
//
//import cn.bonoon.kernel.support.entities.Persistable;
//
//public final class SearcherFactory {
//	
//	private final static SearcherFactory factory = new SearcherFactory();
//	
//	private final Map<Class<?>, ISearcher> searcherMapped = new ConcurrentHashMap<>();
//	
//	private SearcherFactory(){ }
//	
//	public static SearcherFactory getFactory() {
//		return factory;
//	}
//	
//	/**
//	 * 根据类型<code>entityClass</code>进行{@link ISearcher}的注册
//	 * @param applicationContext
//	 * @param entityClass
//	 * @return
//	 */
//	public ISearcher register(ApplicationContext applicationContext, Class<? extends Persistable> entityClass){
//		ISearcher searcher = searcherMapped.get(entityClass);
//		if(null == searcher){
//			searcher = new StandardSearcher(entityClass, applicationContext);
//			searcherMapped.put(entityClass, searcher);
//		}
//		return searcher;
//	}
//}
